package main

import (
	"fmt"
	"time"
)

func main(){
	now := time.Now()
	fmt.Printf("now = %v type = %T\n",now,now)

	fmt.Printf("年=%v\n", now.Year())
	fmt.Printf("月=%v\n", now.Month())
	fmt.Printf("月=%v\n", int(now.Month()))
	fmt.Printf("日=%v\n", now.Day())
	fmt.Printf("时=%v\n", now.Hour())
	fmt.Printf("分=%v\n", now.Minute())
	fmt.Printf("秒=%v\n", now.Second())

	//数字是固定的只能用2006 01 02 15 04 05来匹配
	fmt.Println(time.Now().Format("2006-01-02 15:04:05"))
	
}